﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TileMap
{
    public class MapFactory
    {
        /// <summary>
        /// 创建位图矩阵
        /// </summary>
        /// <param name="rows">行数</param>
        /// <param name="columns">列数</param>
        /// <param name="resolution">单张图片的分辨率</param>
        /// <returns>位图矩阵</returns>
        public static Bitmap[,] CreateBitmapMatrix(int rows , int columns , Size resolution , PixelFormat format)
        {
            Bitmap[,] bmps = new Bitmap[rows, columns];
            for (int i = 0; i < rows; i++)
            {
                for (int j = 0; j < columns; j++)
                {
                    bmps[i, j] = new Bitmap(resolution.Width, resolution.Height, format);
                }
            }
            return bmps;
        } 
    }
}
